<template>
  <div class="functionmolude">
    <span class="danwei">单位:千卡</span>

    <div class="functioncontent">
      <div class="funconlef">
        <span class="funconleftext">推荐</span>
        <span class="funconlefnum">--</span>
      </div>

      <div class="funconcon">
        <span class="funconleftext">剩余</span>
        <span class="funconlefnum">?</span>
        <div class="nie">
          <van-circle
            v-model="currentRate"
            :rate="rate"
            layer-color="#ebedf0"
          />
        </div>
      </div>

      <div class="funconbot">
        <span class="funconleftext">摄入</span>
        <span class="funconlefnum">--</span>
      </div>
    </div>

    <div class="funtcionbottom">
      <div>
        <span>碳水化合物</span>
        <div class="jindutiao">
          <span></span>
        </div>
        <span>0/0克</span>
      </div>

      <div>
        <span>蛋白质</span>
        <div class="jindutiao">
          <span></span>
        </div>
        <span>0/0克</span>
      </div>
      <div>
        <span>脂肪</span>
        <div class="jindutiao">
          <span></span>
        </div>
        <span>0/0克</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      rate: 100,
      currentRate: 0,
    };
  },
};
</script>

<style lang="less" scoped>
.functionmolude {
  margin-top: 10px;
  width: 100%;
  border: 1px solid rgba(109, 109, 109, 0.39);
  background: #ffffff;
  border-radius: 15px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  .danwei {
    color: rgba(128, 128, 128, 0.8);
    font-size: 12px;
    display: block;
    width: 100%;
    text-align: right;
    zoom: 0.9;
  }
  .functioncontent {
    margin: 15px 0px;
    width: 100%;
    height: 25vw;
    display: flex;
    justify-content: center;
    align-items: center;
    div {
      display: flex;
      flex-direction: column;
      align-items: center;
      .funconleftext {
        font-size: 15px;
        color: gray;
      }
      .funconlefnum {
        font-weight: bold;
        letter-spacing: 5px;
      }
      span {
        margin-top: 5px;
      }
    }
    .funconlef {
      color: black;
    }
    .funconcon {
      margin: 0 85px;
      position: relative;
      .nie {
        position: absolute;
        top: -50%;
      }
    }
    .funconbot {
      color: black;
    }
  }
  .funtcionbottom {
    width: 100%;
    display: flex;
    color: gray;
    div {
      display: flex;
      flex-direction: column;
      width: 33%;
      padding: 0 10px;
      span {
        font-size: 12px;
        zoom: 0.9;
      }
      .jindutiao {
        width: 100%;
        height: 3px;
        margin: 5px 0;
        background: #ffe9e8;
      }
    }
  }
}
</style>